function _cl(url) {
	a = document.createElement("a");
	a.setAttribute("href", url);
	return a;
}
function _dh(name, nama, on) {
	url = "http://dic.nicovideo.jp/a/" + name;
	if(nama)
		url +="(%E7%94%9F%E6%94%BE%E9%80%81%E4%B8%BB)";
	return _cl(url);
}
nicodic = function(owner_name, uid) {
	name = encodeURI(owner_name);
	$.getJSON("/nicodic?k=" + name + "&jsoncallback=?",
	function(data) {
		if (data[0]) {
			link = $(_dh(name,1));
			link.addClass("daihyakka_on");
		}
		else if (data[1]) {
			link = $(_dh(name));
			link.addClass("daihyakka_on");
		}
		else {
			link = $(_cl("http://dic.nicovideo.jp/a/" + name + "(%E7%94%9F%E6%94%BE%E9%80%81%E4%B8%BB)"));
			link.addClass("daihyakka_off");
		}
		link.text("百");
		$("#" + uid).append(link);
	});
};